Implement push notification server functionality#19
Merged
at-ok merged 2 commits intoNov 19, 2025
Conversation
Web Push API を使用したサーバー側プッシュ通知機能を実装しました。 主な変更内容: - VAPID キー生成スクリプトの追加 - Next.js API ルート(vapid, subscribe, unsubscribe, send)の実装 - Supabase データベースに push_subscriptions テーブルを追加 - Service Worker のプッシュハンドリングの強化 - useNotifications フックにサーバープッシュ機能を追加 - 環境変数設定の更新 - プッシュ通知システムのドキュメントを作成 新しいファイル: - scripts/generate-vapid-keys.js: VAPID キー生成スクリプト - lib/web-push.ts: Web Push ユーティリティライブラリ - app/api/push/vapid/route.ts: VAPID 公開鍵取得 API - app/api/push/subscribe/route.ts: サブスクリプション登録 API - app/api/push/unsubscribe/route.ts: サブスクリプション解除 API - app/api/push/send/route.ts: プッシュ通知送信 API - supabase/migrations/20250120000000_add_push_subscriptions.sql: DB マイグレーション - docs/push-notifications.md: プッシュ通知システムドキュメント 変更されたファイル: - types/database.ts: push_subscriptions テーブル型定義を追加 - hooks/useNotifications.tsx: サーバープッシュサポートを追加 - public/sw.js: プッシュイベントハンドリングを強化 - .env.example: VAPID キー設定を追加
Phase 6完了を反映し、ドキュメントと実装の整合性を確保しました。 更新内容: - PROGRESS.md: Phase 6追加、未実装機能リスト更新、ファイル構成更新 - README.md: プッシュ通知システム完了を反映、今後の実装予定更新 - ROADMAP.md: Phase 3, 4, 6の進捗状況更新、次回セッション重点項目更新 主な変更: - プッシュ通知サーバー統合が完了済みであることを明記 - 35ファイル作成(28ファイルから7ファイル追加) - 全機能実装済みでゲームプレイ可能な状態であることを明確化 - 残存タスクはSupabase実環境構築と実機テストのみ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.